#include "TubeGate.h"
#include "../Robotmap.h"

TubeGate::TubeGate() : Subsystem("TubeGate") {
	gate = new DoubleSolenoid(RobotMap::SOLENOID_MODULE_SLOT,
							  RobotMap::PNEU_GATE_OPEN_POS,
							  RobotMap::PNEU_GATE_CLOSED_POS);
	gateClosed = true;
}

void TubeGate::InitDefaultCommand() {
	
}

bool TubeGate::isGateClosed() {
	return gateClosed;
}

void TubeGate::openGate() {
	gate->Set(DoubleSolenoid::kForward);
	gateClosed = false;
}

void TubeGate::closeGate() {
	gate->Set(DoubleSolenoid::kReverse);
	gateClosed = true;
}

void TubeGate::valveOff() {
	gate->Set(DoubleSolenoid::kOff);
}
